package com.zshan.clinic.database.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 药品用法表
 */
public class StockDrugUsage implements Serializable {
    /** 用法ID */
    private Long usageId;

    /** 药品ID */
    private Long drugId;

    /** 用法;口服/静脉注射 */
    private String usageCode;

    /** 单次最小用量 */
    private BigDecimal singleMin;

    /** 单次最大用量 */
    private BigDecimal singleMax;

    /** 单日最小用量 */
    private BigDecimal dailyMin;

    /** 单日最大用量 */
    private BigDecimal dailyMax;

    /** 最小适用年龄年 */
    private Integer minAgeYear;

    /** 最小适用年龄月 */
    private Integer minAgeMonth;

    /** 最大适用年龄年 */
    private Integer maxAgeYear;

    /** 最大适用年龄月 */
    private Integer maxAgeMonth;

    /** 诊所ID */
    private Long clinicId;

    /** 启用状态 */
    private String isEnabled;

    /** 删除标识 */
    private String isDelete;

    private Long createUserId;

    /** 创建人 */
    private String createBy;

    /** 创建时间 */
    private Date createTime;

    private Long updateUserId;

    /** 更新人 */
    private String updateBy;

    /** 更新时间 */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Long getUsageId() {
        return usageId;
    }

    public void setUsageId(Long usageId) {
        this.usageId = usageId;
    }

    public Long getDrugId() {
        return drugId;
    }

    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    public String getUsageCode() {
        return usageCode;
    }

    public void setUsageCode(String usageCode) {
        this.usageCode = usageCode == null ? null : usageCode.trim();
    }

    public BigDecimal getSingleMin() {
        return singleMin;
    }

    public void setSingleMin(BigDecimal singleMin) {
        this.singleMin = singleMin;
    }

    public BigDecimal getSingleMax() {
        return singleMax;
    }

    public void setSingleMax(BigDecimal singleMax) {
        this.singleMax = singleMax;
    }

    public BigDecimal getDailyMin() {
        return dailyMin;
    }

    public void setDailyMin(BigDecimal dailyMin) {
        this.dailyMin = dailyMin;
    }

    public BigDecimal getDailyMax() {
        return dailyMax;
    }

    public void setDailyMax(BigDecimal dailyMax) {
        this.dailyMax = dailyMax;
    }

    public Integer getMinAgeYear() {
        return minAgeYear;
    }

    public void setMinAgeYear(Integer minAgeYear) {
        this.minAgeYear = minAgeYear;
    }

    public Integer getMinAgeMonth() {
        return minAgeMonth;
    }

    public void setMinAgeMonth(Integer minAgeMonth) {
        this.minAgeMonth = minAgeMonth;
    }

    public Integer getMaxAgeYear() {
        return maxAgeYear;
    }

    public void setMaxAgeYear(Integer maxAgeYear) {
        this.maxAgeYear = maxAgeYear;
    }

    public Integer getMaxAgeMonth() {
        return maxAgeMonth;
    }

    public void setMaxAgeMonth(Integer maxAgeMonth) {
        this.maxAgeMonth = maxAgeMonth;
    }

    public Long getClinicId() {
        return clinicId;
    }

    public void setClinicId(Long clinicId) {
        this.clinicId = clinicId;
    }

    public String getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(String isEnabled) {
        this.isEnabled = isEnabled == null ? null : isEnabled.trim();
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete == null ? null : isDelete.trim();
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StockDrugUsage other = (StockDrugUsage) that;
        return (this.getUsageId() == null ? other.getUsageId() == null : this.getUsageId().equals(other.getUsageId()))
            && (this.getDrugId() == null ? other.getDrugId() == null : this.getDrugId().equals(other.getDrugId()))
            && (this.getUsageCode() == null ? other.getUsageCode() == null : this.getUsageCode().equals(other.getUsageCode()))
            && (this.getSingleMin() == null ? other.getSingleMin() == null : this.getSingleMin().equals(other.getSingleMin()))
            && (this.getSingleMax() == null ? other.getSingleMax() == null : this.getSingleMax().equals(other.getSingleMax()))
            && (this.getDailyMin() == null ? other.getDailyMin() == null : this.getDailyMin().equals(other.getDailyMin()))
            && (this.getDailyMax() == null ? other.getDailyMax() == null : this.getDailyMax().equals(other.getDailyMax()))
            && (this.getMinAgeYear() == null ? other.getMinAgeYear() == null : this.getMinAgeYear().equals(other.getMinAgeYear()))
            && (this.getMinAgeMonth() == null ? other.getMinAgeMonth() == null : this.getMinAgeMonth().equals(other.getMinAgeMonth()))
            && (this.getMaxAgeYear() == null ? other.getMaxAgeYear() == null : this.getMaxAgeYear().equals(other.getMaxAgeYear()))
            && (this.getMaxAgeMonth() == null ? other.getMaxAgeMonth() == null : this.getMaxAgeMonth().equals(other.getMaxAgeMonth()))
            && (this.getClinicId() == null ? other.getClinicId() == null : this.getClinicId().equals(other.getClinicId()))
            && (this.getIsEnabled() == null ? other.getIsEnabled() == null : this.getIsEnabled().equals(other.getIsEnabled()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUsageId() == null) ? 0 : getUsageId().hashCode());
        result = prime * result + ((getDrugId() == null) ? 0 : getDrugId().hashCode());
        result = prime * result + ((getUsageCode() == null) ? 0 : getUsageCode().hashCode());
        result = prime * result + ((getSingleMin() == null) ? 0 : getSingleMin().hashCode());
        result = prime * result + ((getSingleMax() == null) ? 0 : getSingleMax().hashCode());
        result = prime * result + ((getDailyMin() == null) ? 0 : getDailyMin().hashCode());
        result = prime * result + ((getDailyMax() == null) ? 0 : getDailyMax().hashCode());
        result = prime * result + ((getMinAgeYear() == null) ? 0 : getMinAgeYear().hashCode());
        result = prime * result + ((getMinAgeMonth() == null) ? 0 : getMinAgeMonth().hashCode());
        result = prime * result + ((getMaxAgeYear() == null) ? 0 : getMaxAgeYear().hashCode());
        result = prime * result + ((getMaxAgeMonth() == null) ? 0 : getMaxAgeMonth().hashCode());
        result = prime * result + ((getClinicId() == null) ? 0 : getClinicId().hashCode());
        result = prime * result + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", usageId=").append(usageId);
        sb.append(", drugId=").append(drugId);
        sb.append(", usageCode=").append(usageCode);
        sb.append(", singleMin=").append(singleMin);
        sb.append(", singleMax=").append(singleMax);
        sb.append(", dailyMin=").append(dailyMin);
        sb.append(", dailyMax=").append(dailyMax);
        sb.append(", minAgeYear=").append(minAgeYear);
        sb.append(", minAgeMonth=").append(minAgeMonth);
        sb.append(", maxAgeYear=").append(maxAgeYear);
        sb.append(", maxAgeMonth=").append(maxAgeMonth);
        sb.append(", clinicId=").append(clinicId);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}